﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Intel_Client_GUI
{
	/// <summary>
	/// KeyHotChart.xaml 的交互逻辑
	/// </summary>
	public partial class KeyHotChart : Page
	{
		public KeyHotChart()
		{
			this.InitializeComponent();
			this.AddHandler(VirtualKeyboard.VKPressedEvent,new RoutedEventHandler(EventHandler),true);
		   	
		}
		public void EventHandler(object sender,RoutedEventArgs e)
		{
			var vkkb = e.OriginalSource as VirtualKeyboard;
			if(vkkb==null)
				return;
			var vm = this.FindResource("VkDataSource") as VkViewModel;
			vm.ShowKeyDetail(vkkb.KeyCode);
		}
	}
	
	
}